<?php
namespace Home\Model;
use Think\Model;

class FoodsModel extends Model {
  /**
   * 查询商户的菜单
   * @param int $mid 商户id
   * @return array $rs
   */
  public function getAllByMid($mid){
    $foodsList=$this->where('mid='.$mid)->select();
    $rs=[];
    if(empty($foodsList))
      return $rs;
    foreach ($foodsList as $k=> $v) {
        $rs[$v['id']]=$v;
      }
    return $rs;
  }
 

}
